#ifndef MAPOBJ_H
#define MAPOBJ_H

#include <string>

#include "defines.h"

class MapObject//prototype for terrain tiles, objects, monsters
{
public:
	MapObject( int x, int y, std::string name = "Object", char symbol = ' ' );
	virtual ~MapObject();
	DECLARE_INSTANCE;
	void setMapObject( map * m, int x, int y, std::string name = "object", char symbol = ' ' );
	inline int getX() const;
	inline int getY() const;
	virtual bool move( int direction );
	virtual void draw();
	virtual int setPos( int x, int y );//sets the position at given coordinates, returns the success
    virtual int setPos( const MapObject * );
	virtual int setMapPos( map *, int x, int y );
	map * getMap() const;
	virtual bool isValidLoc() const;
	virtual objType getType() const;
	virtual void hitEffect( int force );
	virtual void showDesc() const;
	//virtual bool visibleMessage( std::string );
	//virtual bool visibleMessage( const char * );


	double layer;
	std::string name;
	std::string description;
	char symbol;
	bool isGhost; // can it walk through walls?
	unsigned int color;
	bool drawTo;
protected:
	MapObject();


	int x;
	int y;
	objType type_;
	map * map_;
};

#endif